#pragma once

#define SIZE 1024

#define FLUSH_NONE 0
#define FLUSH_LINE 1
#define FLUSH_FULL 2

struct IO_FIFE 
{
    int flag;
    int fileno;
    char outbuffer[SIZE];
    int cap;
    int size;

};

typedef struct IO_FIFE mFILE;

mFILE* myopen(const char* filename, const char* mode);
int mywrite(const void* ptr,int num,mFILE* stream);
void myfflush(mFILE* stream);
void myclose(mFILE* stream);
